package com.kongwg.java;

import java.util.Date;

/**
 * 我是文档中注释
 */
public class Hello {

    static int num = 10;

    public static void main(String[] args) {

        System.out.println("你好世界");
        System.out.println("num = " + num);
        Person p = new Person();
        p.eat();
        System.out.println();

        Date date = new Date();


    }
}

class Person {
    int age = 0;
    String name;

    public Person() {
    }

    public Person(int age, String name) {
        this.age = age;
        this.name = name;
    }


    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void eat() {
        System.out.println("我爱吃饭");
    }


    @Override
    public String toString() {
        return "Person{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }
}
